﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data;
using System.Data.SqlClient;
using Model;
namespace DAL
{
   public class DAL_Products
    {
       //查询商品
       public static SqlDataReader CXsp(string CXTJ)
       {
           string sql = @"select * from  Products as p
join ProductType as pt
on
pt.PTID=p.PTID";
           List<SqlParameter> list=new List<SqlParameter>();
           if (CXTJ != null)
	{
        sql += " where ProductName like '%'+@CXTJ+'%' or ProductJP like '%'+@CXTJ+'%'";
               list.Add(new SqlParameter("@CXTJ",CXTJ));
	}
          return DBHelper.Zhilianshi(sql,list.ToArray());
       }

      
    }
}
